description = "头部导航模块"

[viewBag]
==
{% set categories = catalog.categories %}
{% set categoriesCount = count(categories) %}
<div id="topMenu">
    <ul class="ulMenu">
        {% if categoriesCount>0 %}

        {% for category in categories %}
        {% set childcount=count(category.children) %}
        {% if category.is_enabled == 1 and category.id in [16,21,24] %}
        <li>
            <div class="Header">
                <a href="{{ category.url }}">{{ category.name }}</a>
                <span class="arrow right"></span>
            </div>
            <div class="Content">
                {% if childcount>0 %}
                <ul>
                    {% for sencondcate in category.children %}
                    {% if sencondcate.is_enabled == 1 %}
                    <li>
                        <a href="{{sencondcate.url}}">{{ sencondcate.name }}</a>
                        {% if count(sencondcate.children) > 0 %}
                        <ul class="grandsonUl">
                            {% for threecate in sencondcate.children %}
                            {% if threecate.is_enabled == 1%}
                            <li>
                                <a href="{{ threecate.url }}">{{ threecate.name }}</a>
                            </li>
                            {% endif %}
                            {% endfor %}
                        </ul>
                        {% endif %}
                    </li>
                    {% endif %}
                    {% endfor %}
                </ul>
                {% endif %}
            </div>
        </li>
        {% endif %}
        {% endfor %}

        {% for category in categories %}
        {% set childcount=count(category.children) %}
        {% if category.is_enabled == 1 and category.id not in [16,21,24] %}
        <li>
            <div class="Header">
                <a href="{{ category.url }}">{{ category.name }}</a>
                <span class="arrow right"></span>
            </div>
            <div class="Content">
                {% if childcount>0 %}
                <ul>
                    {% for sencondcate in category.children %}
                    {% if sencondcate.is_enabled == 1 %}
                    <li>
                        <a href="{{sencondcate.url}}">{{ sencondcate.name }}</a>
                        {% if count(sencondcate.children) > 0 %}
                        <ul class="grandsonUl">
                            {% for threecate in sencondcate.children %}
                            {% if threecate.is_enabled == 1%}
                            <li>
                                <a href="{{ threecate.url }}">{{ threecate.name }}</a>
                            </li>
                            {% endif %}
                            {% endfor %}
                        </ul>
                        {% endif %}
                    </li>
                    {% endif %}
                    {% endfor %}
                </ul>
                {% endif %}
            </div>
        </li>
        {% endif %}
        {% endfor %}
        {% endif %}
    </ul>
</div>